file="/etc/hosts"
begin_tag="# Script Host Begin"
end_tag="# Script Host End"
begin=`grep -n "$begin_tag" $file | head -1 | cut -d : -f 1`
end=`grep -n "$end_tag" $file | tail -1 | cut -d : -f 1`
sed -i "${begin},${end}d" $file
echo $begin_tag >> $file
# 可以在这里增加多条源
wget https://raw.hellogithub.com/hosts -O - >> $file
echo $end_tag >> $file
